package deepbitview

import grails.test.*

class GlobalStatsServiceTests extends GrailsUnitTestCase {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testFetchGlobalStats() {

        GlobalStatsService globalStatsService = new GlobalStatsService()

        def result = globalStatsService.fetchGlobalStats()

        assertTrue(result["network_speed"] > 0)
        assertTrue(result["blocks"] > 0)
        assertTrue(result["bitcoins_total"] > 0)
        assertTrue(result["difficulty"] > 0)
        assertTrue(result["difficulty_estimate"] > 0)


    }
}
